package com.five.community.service.impl;

import com.five.community.bean.Parkinguse;
import com.five.community.bean.vo.ParkinguseVo;
import com.five.community.mapper.ParkinguseMapper;
import com.five.community.service.ParkinguseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/*
    车位使用管理业务层实现
 */
@Service
public class ParkinguseServiceImpl  implements ParkinguseService {

    @Autowired
    private ParkinguseMapper parkinguseMapper;

    @Override
    public List<Parkinguse> selectAll() throws Exception {
        return parkinguseMapper.selectAll();
    }

    @Override
    public Parkinguse selectById(long id) throws Exception {
        return parkinguseMapper.selectById(id);
    }

    @Override
    public long selectPidById(long id) throws Exception {
        return parkinguseMapper.selectPidById(id);
    }

    @Override
    public List<ParkinguseVo> selectAllAndPnameHnameVname() throws Exception {
        return parkinguseMapper.selectAllAndPnameHnameVname();
    }

    @Override
    public List<ParkinguseVo> selectAllAndPnameHnameVnameByVname(String vname) throws Exception {
        return parkinguseMapper.selectAllAndPnameHnameVnameByVname(vname);
    }

    @Override
    public void insert(Parkinguse parkinguse) throws Exception {
        parkinguseMapper.insert(parkinguse);
    }

    @Override
    public void deleteById(long id) throws Exception {
        parkinguseMapper.deleteById(id);
    }

    @Override
    public void updateById(Parkinguse parkinguse) throws Exception {
        parkinguseMapper.updateById(parkinguse);
    }


}
